home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / X11 / XAllocWMHints.z / XAllocWMHints
Encoding:
Text File  |  1998-10-30  |  10.7 KB  |  241 lines

  1.  
  2.  
  3.  
  4.      XXXXAAAAllllllllooooccccWWWWMMMMHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333)))) XXXXAAAAllllllllooooccccWWWWMMMMHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XAllocWMHints, XSetWMHints, XGetWMHints, XWMHints - allocate
  10.           window manager hints structure and set or read a window's
  11.           WM_HINTS property
  12.  
  13.      SSSSYYYYNNNNTTTTAAAAXXXX
  14.           XWMHints *XAllocWMHints()
  15.  
  16.           XSetWMHints(_d_i_s_p_l_a_y, _w, _w_m_h_i_n_t_s)
  17.                 Display *_d_i_s_p_l_a_y;
  18.                 Window _w;
  19.                 XWMHints *_w_m_h_i_n_t_s;
  20.  
  21.  
  22.           XWMHints *XGetWMHints(_d_i_s_p_l_a_y, _w)
  23.                 Display *_d_i_s_p_l_a_y;
  24.                 Window _w;
  25.  
  26.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  27.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  28.  
  29.           _w         Specifies the window.
  30.  
  31.           _w_m_h_i_n_t_s   Specifies the _X_W_M_H_i_n_t_s structure to be used.
  32.  
  33.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  34.           The _X_A_l_l_o_c_W_M_H_i_n_t_s function allocates and returns a pointer
  35.           to a _X_W_M_H_i_n_t_s structure.  Note that all fields in the
  36.           _X_W_M_H_i_n_t_s structure are initially set to zero.  If
  37.           insufficient memory is available, _X_A_l_l_o_c_W_M_H_i_n_t_s returns
  38.           NULL.  To free the memory allocated to this structure, use
  39.           _X_F_r_e_e.
  40.  
  41.           The _X_S_e_t_W_M_H_i_n_t_s function sets the window manager hints that
  42.           include icon information and location, the initial state of
  43.           the window, and whether the application relies on the window
  44.           manager to get keyboard input.
  45.  
  46.           _X_S_e_t_W_M_H_i_n_t_s can generate _B_a_d_A_l_l_o_c and _B_a_d_W_i_n_d_o_w errors.
  47.  
  48.           The _X_G_e_t_W_M_H_i_n_t_s function reads the window manager hints and
  49.           returns NULL if no WM_HINTS property was set on the window
  50.           or returns a pointer to a _X_W_M_H_i_n_t_s structure if it succeeds.
  51.           When finished with the data, free the space used for it by
  52.           calling _X_F_r_e_e.
  53.  
  54.           _X_G_e_t_W_M_H_i_n_t_s can generate a _B_a_d_W_i_n_d_o_w error.
  55.  
  56.      PPPPRRRROOOOPPPPEEEERRRRTTTTIIIIEEEESSSS
  57.           WM_HINTS  Additional hints set by the client for use by the
  58.                     window manager.  The C type of this property is
  59.                     _X_W_M_H_i_n_t_s.
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXAAAAllllllllooooccccWWWWMMMMHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333)))) XXXXAAAAllllllllooooccccWWWWMMMMHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  75.           The _X_W_M_H_i_n_t_s structure contains:
  76.  
  77.           /* Window manager hints mask bits */
  78.           #define
  79.                     _I_n_p_u_t_H_i_n_t
  80.                                                 (1L << 0)
  81.           #define
  82.                     _S_t_a_t_e_H_i_n_t
  83.                                                 (1L << 1)
  84.           #define
  85.                     _I_c_o_n_P_i_x_m_a_p_H_i_n_t
  86.                                                 (1L << 2)
  87.           #define
  88.                     _I_c_o_n_W_i_n_d_o_w_H_i_n_t
  89.                                                 (1L << 3)
  90.           #define
  91.                     _I_c_o_n_P_o_s_i_t_i_o_n_H_i_n_t
  92.                                                 (1L << 4)
  93.           #define
  94.                     _I_c_o_n_M_a_s_k_H_i_n_t
  95.                                                 (1L << 5)
  96.           #define
  97.                     _W_i_n_d_o_w_G_r_o_u_p_H_i_n_t
  98.                                                 (1L << 6)
  99.           #define
  100.                     _U_r_g_e_n_c_y_H_i_n_t
  101.                                                 (1L << 8)
  102.           #define
  103.                     _A_l_l_H_i_n_t_s
  104.                                                 (InputHint|StateHint|IconPixmapHint|
  105.                                                 IconWindowHint|IconPositionHint|
  106.                                                 IconMaskHint|WindowGroupHint)
  107.  
  108.  
  109.           /* Values */
  110.  
  111.           typedef struct {
  112.                long flags;         /* marks which fields in this structure are defined */
  113.                Bool input;         /* does this application rely on the window manager to
  114.                                    get keyboard input? */
  115.                int initial_state;  /* see below */
  116.                Pixmap icon_pixmap; /* pixmap to be used as icon */
  117.                Window icon_window; /* window to be used as icon */
  118.                int icon_x, icon_y; /* initial position of icon */
  119.                Pixmap icon_mask;   /* pixmap to be used as mask for icon_pixmap */
  120.                XID window_group;   /* id of related window group */
  121.                /* this structure may be extended in the future */
  122.           } XWMHints;
  123.  
  124.           The input member is used to communicate to the window
  125.           manager the input focus model used by the application.
  126.           Applications that expect input but never explicitly set
  127.           focus to any of their subwindows (that is, use the push
  128.           model of focus management), such as X Version 10 style
  129.           applications that use real-estate driven focus, should set
  130.           this member to _T_r_u_e.  Similarly, applications that set input
  131.           focus to their subwindows only when it is given to their
  132.           top-level window by a window manager should also set this
  133.           member to _T_r_u_e.  Applications that manage their own input
  134.           focus by explicitly setting focus to one of their subwindows
  135.           whenever they want keyboard input (that is, use the pull
  136.           model of focus management) should set this member to _F_a_l_s_e.
  137.           Applications that never expect any keyboard input also
  138.           should set this member to _F_a_l_s_e.
  139.  
  140.           Pull model window managers should make it possible for push
  141.           model applications to get input by setting input focus to
  142.           the top-level windows of applications whose input member is
  143.           _T_r_u_e.  Push model window managers should make sure that pull
  144.           model applications do not break them by resetting input
  145.           focus to _P_o_i_n_t_e_r_R_o_o_t when it is appropriate (for example,
  146.  
  147.  
  148.  
  149.      Page 2                                          (printed 4/30/98)
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.      XXXXAAAAllllllllooooccccWWWWMMMMHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333)))) XXXXAAAAllllllllooooccccWWWWMMMMHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  157.  
  158.  
  159.  
  160.           whenever an application whose input member is _F_a_l_s_e sets
  161.           input focus to one of its subwindows).
  162.  
  163.           The definitions for the initial_state flag are:
  164.           #define
  165.                     _W_i_t_h_d_r_a_w_n_S_t_a_t_e
  166.                                            0
  167.           #define
  168.                     _N_o_r_m_a_l_S_t_a_t_e
  169.                                            1
  170.                                                 /* most applications start
  171.                                                 this way */
  172.  
  173.           #define
  174.                     _I_c_o_n_i_c_S_t_a_t_e
  175.                                            3
  176.                                                 /* application wants to
  177.                                                 start as an icon */
  178.  
  179.           The icon_mask specifies which pixels of the icon_pixmap
  180.           should be used as the icon. This allows for nonrectangular
  181.           icons.  Both icon_pixmap and icon_mask must be bitmaps.  The
  182.           icon_window lets an application provide a window for use as
  183.           an icon for window managers that support such use.  The
  184.           window_group lets you specify that this window belongs to a
  185.           group of other windows.  For example, if a single
  186.           application manipulates multiple top-level windows, this
  187.           allows you to provide enough information that a window
  188.           manager can iconify all of the windows rather than just the
  189.           one window.
  190.  
  191.           The _U_r_g_e_n_c_y_H_i_n_t flag, if set in the flags field, indicates
  192.           that the client deems the window contents to be urgent,
  193.           requiring the timely response of the user.  The window
  194.           manager will make some effort to draw the user's attention
  195.           to this window while this flag is set.  The client must
  196.           provide some means by which the user can cause the urgency
  197.           flag to be cleared (either mitigating the condition that
  198.           made the window urgent or merely shutting off the alarm) or
  199.           the window to be withdrawn.
  200.  
  201.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  202.           _B_a_d_A_l_l_o_c  The server failed to allocate the requested
  203.                     resource or server memory.
  204.  
  205.           _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  206.                     defined Window.
  207.  
  208.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  209.           XAllocClassHint(3X11), XAllocIconSize(3X11),
  210.           XAllocSizeHints(3X11), XFree(3X11), XSetCommand(3X11),
  211.           XSetTransientForHint(3X11), XSetTextProperty(3X11),
  212.           XSetWMClientMachine(3X11), XSetWMColormapWindows(3X11),
  213.           XSetWMIconName(3X11), XSetWMName(3X11),
  214.           XSetWMProperties(3X11), XSetWMProtocols(3X11),
  215.           XStringListToTextProperty(3X11)
  216.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.      Page 3                                          (printed 4/30/98)
  226.  
  227.  
  228.  
  229.